﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;

namespace WinnerCMS.Data.Mapping
{
    public partial class TemplatesMap
        : EntityTypeConfiguration<WinnerCMS.Model.Template>
    {
        public TemplatesMap()
        {
            // table
            //ToTable("CMS_Template");

            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                
                .IsFixedLength()
                .IsUnicode(false)
                .HasMaxLength(36)
                .IsRequired();
            Property(t => t.TemplateName)
                
                .HasMaxLength(50)
                .IsOptional();
            Property(t => t.TemplatePath)
                
                .HasMaxLength(50)
                .IsOptional();
            Property(t => t.IsUsed)
                .IsOptional();
            Property(t => t.Style)
                
                .HasMaxLength(50)
                .IsOptional();
            Property(t => t.Remark)
                
                .HasMaxLength(100)
                .IsOptional();

            // Relationships

            //InitializeMapping();
        }
    }
}

